/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-09-21
 * Time:17:27
 */
public class TestDemo {
    public static boolean ha(){
        return true;
    }
    public static void main(String[] args) {
        //使用常量字符串构造
        String str1="hello";
        System.out.println(str1);
        //直接new String对象
        String str2=new String("world");
        System.out.println(str2);
        //使用字符数组进行构造
        char[] arr=new char[]{
                's','l','e','e','p'
        };
        String str3=new String(arr);
        System.out.println(str3);
        String cur=null;
        while(cur!=null||!ha()){
            System.out.println("true");
        }
    }
}
